package com.ctshk.rpc.payment.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.payment.enums
 * @Author: hef
 * @CreateTime: 2021-05-08 15:22
 * @Description: 描述
 */
@Getter
@AllArgsConstructor
public enum RefundStatus {
    PROCESSING(0, "处理中"),
    SUCCESS(1, "已退款"),
    FAILURE(2,"退款失败"),
    ;
    private Integer status;
    private String desc;

    public static RefundStatus getByStatus(Integer status){
        RefundStatus refundStatus = Arrays.stream(RefundStatus.values()).filter(enums -> status.equals(enums.getStatus())).findFirst().orElse(null);
        return refundStatus;
    }
}
